#ifndef __REGEXFILTER_H
#define __REGEXFILTER_H

#include <pcre.h>
#include <string>
#include "Filter.h"
#include "Tree.h"

class InvalidRegExFilterException
{
};

class RegExFilter : public IFilter
{
	friend class IFilter;
public:
	virtual ~RegExFilter();
	bool Match( const Tree & tree ) const;
private:
	RegExFilter(const std::string & regEx);
	bool Match( const Tree::Node & node ) const;
	pcre * compiled;
	pcre_extra * studied;
};

#endif //__REGEXFILTER_H